package com.easy.controller;

import com.easy.entity.Order;
import com.easy.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName OrderController
 * @Description TODO
 * @Author 周轩霆
 * @Date 2022/5/31 15:05
 **/
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("/getRoomOrder")
    public List<Order> getRoomOrder(@RequestParam Map params) {
        

        return orderService.getRoomOrder(params);

    }

    @RequestMapping("/incomeday")
    public List<Map> incomeday(@RequestParam Map params) {

        return orderService.incomeday(params);

    }
    @RequestMapping("/incomemonth")
    public List<Map> incomemonth(@RequestParam Map params) {

        return orderService.incomemonth(params);

    }
    @RequestMapping("/incomeyear")
    public List<Map> incomeyear(@RequestParam Map params) {

        return orderService.incomeyear(params);

    }

    /*会员总消费情况*/
    @RequestMapping("/consumption")
    public List<Map> consumption(@RequestParam Map params) {

        return orderService.consumption(params);

    }
}
